-- the debug mode
if is_mode("debug") then
    
    -- enable the debug symbols
    set_symbols("debug")

    -- disable optimization
    set_optimize("none")
end

-- the release mode
if is_mode("release") then

    -- set the symbols visibility: hidden
    set_symbols("hidden")

    -- enable fastest optimization
    set_optimize("fastest")

    -- strip all symbols
    set_strip("all")
end

-- add target
target("testbbb")

    -- set kind
    set_kind("$(kind)")
    add_defines("EDUI_EXPORTS")

    add_defines("EXPORT")

    -- set the auto-generated config.h
    set_config_h("$(buildir)/testbbb/config.h")
    set_config_h_prefix("CONFIG")

 -- 设置输出头文件目录
    set_headerdir("$(buildir)/testbbb")
    -- add includes directory
    add_includedirs("$(buildir)/testbbb")

     add_headers("src/(**.h)")

    if is_kind("static") then
        -- 添加宏定义
        add_defines_h("$(prefix)_USE_STATIC")
    else
        add_defines_h("$(prefix)_USE_SHARED")
    end

    -- add files
    add_files("src/interface.cpp") 

-- add target
target("test")

    -- set kind
    set_kind("binary")

    -- add deps
    add_deps("testbbb")

    -- add files
    add_files("src/test.cpp") 

    -- add links
    add_links("testbbb")

    -- add link directory
    add_linkdirs("$(buildir)")
    
    add_includedirs("$(buildir)/testbbb")

    add_cxflags("-EHsc")
